/*    */ package eos.moe.dragoncore;
/*    */ 
/*    */ import java.io.File;
/*    */ import java.io.IOException;
/*    */ import net.minecraft.nbt.CompressedStreamTools;
/*    */ import net.minecraft.nbt.NBTBase;
/*    */ import net.minecraft.nbt.NBTTagCompound;
/*    */ import org.apache.logging.log4j.Level;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class jp
/*    */ {
/*    */   private File q;
/*    */   private eos/moe/dragoncore/rz[] g;
/*    */   
/*    */   public jp(File file) {
/* 19 */     this.q = file;
/* 20 */     this.g = new eos/moe/dragoncore/rz[7];
/* 21 */     for (int i = 0; i < 7; i++)
/* 22 */       this.g[i] = new eos/moe/dragoncore/rz("Slot " + (i + 1)); 
/*    */   }
/*    */   
/*    */   public void t() throws IOException {
/* 26 */     if (this.q.exists() && this.q.canRead()) {
/* 27 */       NBTTagCompound nBTTagCompound = CompressedStreamTools.func_74797_a(this.q);
/* 28 */       for (int i = 0; i < 7; i++) {
/* 29 */         String str = "slot" + (i + 1);
/* 30 */         if (nBTTagCompound.func_74764_b(str))
/* 31 */           (this.g[i]).g = nBTTagCompound.func_74775_l(str); 
/* 32 */         if (nBTTagCompound.func_74764_b(str + "Name"))
/* 33 */           (this.g[i]).q = nBTTagCompound.func_74779_i(str + "Name"); 
/*    */       } 
/*    */     } 
/*    */   }
/*    */   
/*    */   public void h() throws IOException {
/* 39 */     NBTTagCompound nBTTagCompound = new NBTTagCompound();
/* 40 */     for (int i = 0; i < 7; i++) {
/* 41 */       nBTTagCompound.func_74782_a("slot" + (i + 1), (NBTBase)(this.g[i]).g);
/* 42 */       nBTTagCompound.func_74778_a("slot" + (i + 1) + "Name", (this.g[i]).q);
/*    */     } 
/* 44 */     CompressedStreamTools.func_74795_b(nBTTagCompound, this.q);
/*    */   }
/*    */   
/*    */   public void z() {
/*    */     try {
/* 49 */       h();
/* 50 */       qz.v(Level.TRACE, "NBTEdit saved successfully.");
/* 51 */     } catch (IOException iOException) {
/* 52 */       qz.v(Level.WARN, "Unable to write NBTEdit save.");
/* 53 */       qz.v("SaveStates", "save", iOException);
/*    */     } 
/*    */   }
/*    */   
/*    */   public void v() {
/*    */     try {
/* 59 */       t();
/* 60 */       qz.v(Level.TRACE, "NBTEdit save loaded successfully.");
/* 61 */     } catch (IOException iOException) {
/* 62 */       qz.v(Level.WARN, "Unable to read NBTEdit save.");
/* 63 */       qz.v("SaveStates", "load", iOException);
/*    */     } 
/*    */   }
/*    */   
/*    */   public eos/moe/dragoncore/rz v(int i) {
/* 68 */     return this.g[i];
/*    */   }
/*    */   
/*    */   public static final class eos/moe/dragoncore/rz {
/*    */     public String q;
/*    */     public NBTTagCompound g;
/*    */     
/*    */     public eos/moe/dragoncore/rz(String str) {
/* 76 */       this.q = str;
/* 77 */       this.g = new NBTTagCompound();
/*    */     }
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\jp.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */